﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;

namespace bdnt_pets_system_Entity
{
    [DataContract]
    public class Tbl_Role
    {
        Int32 id;
        [DataMember]
        public Int32 Id
        {
            get { return id; }
            set { id = value; }
        }

        string roleName;
        [Required(ErrorMessage = "角色名不能为空！")]
        [DataMember]
        public string RoleName
        {
            get { return roleName; }
            set
            {
                if (roleName != value)
                {
                    Validator.ValidateProperty(value,
                        new ValidationContext(this, null, null) { MemberName = "RoleName" });
                    roleName = value;
                }
            }
        }

        Int32 roleState;
        [DataMember]
        public Int32 RoleState
        {
            get { return roleState; }
            set { roleState = value; }
        }

        string roleStateStr;
        [DataMember]
        public string RoleStateStr
        {
            get { return roleStateStr; }
            set { roleStateStr = value; }
        }

        string remark;
        [DataMember]
        public string Remark
        {
            get { return remark; }
            set { remark = value; }
        }

        string meunIds;
        [DataMember]
        public string MeunIds
        {
            get { return meunIds; }
            set { meunIds = value; }
        }

    }
}
